[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
+ Addition, Set Union, and Concatenation Operator
--------------------------------------------------------------------------
Addition
<exp1> + <exp2>
The + operator performs addition. The result depends upon the
operands. If either is real, the result is real; otherwise, the result
is integer.
<exp1>,<exp2> Any real or integer expression.
Example:
I := 3223 + 88; { I = 3311 }
X := 3.5 + 4.5; { X = 8.0 }
--------------------------------------------------------------------------
Set Union
<set1> + <set2>
The + operator performs set union. The result is a set of the same
base type as the operands, whose members are members of either <set1>
or <set2>.
<set1>,<set2> Any set expression. Both expressions must be of the
same base type.
Example:
S := [1,2,5,6] + [2,4,6,8]; { S = [1,2,4,5,6,8] }
--------------------------------------------------------------------------
String Concatenation
<str1> + <str2>
The + operator performs concatenation on strings. The result is a
string composed of <str1> followed by <str2>.
<str1>,<str2> Any string expression.
Example:
Name := 'Rufus ' + 'Jones'; { Name = 'Rufus Jones' }
See Also:
-
mod
div
*
/
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson